<script setup>
  import {computed} from 'vue'
  import {useRoute} from 'vue-router'

  const isHomeView = computed( ()=>{
    return useRoute().name === 'Home'
  })
</script>

<template>
  <div :class="{'grey-background': !isHomeView}">Child Route: {{$route.params.username}}</div>
</template>

<style scoped>
.grey-background {
  background-color: grey;
}
</style>